package com.zxt.recruit.util;

import org.springframework.stereotype.Component;

import java.nio.charset.Charset;

@Component
public class EncodingExample {

    public String utf_8(String text){
        try {
            byte[] bytes = text.getBytes("ISO-8859-1");
            String newString = new String(bytes, Charset.forName("UTF-8"));
            return newString;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

}
